//
//  ZXLSignTools.h
//  SignSecurityDemo
//
//  Created by zxl02 on 2020/8/14.
//  Copyright © 2020 CordovaDemo. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

#pragma mark - tools
@interface ZXLSignTools : NSObject

/// 字典排序 返回:key=value&key=value
/// @param params 字典
+ (NSString *)getStringWithDic:(NSMutableDictionary*)params;

/// 字典转字符串
/// @param dic 字典
+(NSString *)JSONString:(NSDictionary*)dic;

/// JSON字符串转成NSDictionary
/// @param jsonStr 字符串
+(NSDictionary *) dictionaryValue:(NSString*)jsonStr;

/// base64加密
/// @param string 字符串
+(NSString *)base64EncodeString:(NSString *)string;

/// base64解密
/// @param string 字符串
+(NSString *)base64DecodeString:(NSString *)string;

/// base86转data
/// @param string 字符串
+ (NSData *)base64DataFromString:(NSString *)string;

/**
 *  驼峰转下划线（loveYou -> love_you）
 */
+ (NSString *)underlineFromCamel:(NSString*)str;
/**
 *  下划线转驼峰（love_you -> loveYou）
 */
+ (NSString *)camelFromUnderline:(NSString*)str;
/**
 * 首字母变大写
 */
+ (NSString *)firstCharUpper:(NSString*)str;
/**
 * 首字母变小写
 */
+ (NSString *)firstCharLower:(NSString*)str;

+ (NSData *)UTF8DataWith:(NSData*)data;
@end

NS_ASSUME_NONNULL_END
